package com.tools.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.tools.dao.ThemeDetailDao;
import com.tools.entity.ThemeDetail;
import com.tools.service.ThemeDetailService;

@Service
@Transactional
public class ThemeDetailServiceImpl implements ThemeDetailService {

	@Autowired
	private ThemeDetailDao themeDetailDao;

	@Transactional(propagation=Propagation.REQUIRED,rollbackFor=Exception.class)
	public boolean insert(ThemeDetail themeDetail) {
		// TODO Auto-generated method stub
		return themeDetailDao.insert(themeDetail)>0;
	}

	@Transactional(propagation=Propagation.REQUIRED,rollbackFor=Exception.class)
	public boolean delete(int id) {
		// TODO Auto-generated method stub
		return themeDetailDao.delete(id)>0;
	}

	@Transactional(propagation=Propagation.REQUIRED,rollbackFor=Exception.class)
	public boolean update(ThemeDetail themeDetail) {
		// TODO Auto-generated method stub
		return themeDetailDao.update(themeDetail)>0;
	}
	
}
